
{config_load file='foo.conf'}

{block name=body}

	{*load from config file*}
	{#pageTitle#}<br/>
	
	

	{*this is comment*}
	{assign var=foo value='tran huy nam abc'}
	{assign var=fooTruncCount value=10}
	
	User Information: <br/>
	Name: {$name}<br/>
	Address: {$address}<br/>
	{$foo}<br/>
	   {literal}
		function bazzy {alert('foobar!');}
	   {/literal}
	   <br/>
	{$Contacts.fax}<br />
{$Contacts.email}<br />
{* you can print arrays of arrays as well *}
{$Contacts.phone.home}<br />
{$Contacts.phone.cell}<br />

<br/>
	
Day here: {$date123|date_format:"%A, %B %e, %Y"} <br/>
<br/>
{$smarty.current_dir}<br/>


{$detail.Post.title}

{assign var=count value=1}

{*
<div  style="background-color:{#bodyBgColor#}">
{foreach from=$arr item=foo}
    <li>{$count}  {$foo}</li>
    {assign var=count value={$count+1}}
{/foreach}
</div>
*}

<br/>
{assign var=foo value='2014-01'}
{assign var=afterFoo value={$foo|cat:"-01"}}

<br/>here: {$afterFoo}



<br/>
{* array 30 elemnt, dung secion, doi mau theo chan le*}
{section name=customer loop=$arr step=1}
  {if {$smarty.section.customer.iteration % 2}  eq 0}
  	<span style="color: #6600FF" > {$arr[customer]} </span>
  {else}
  	<span style="color: #FF9900" > {$arr[customer]} </span>
  {/if}
{/section}

{* apply modifier to literal string *}
{"foobar"|upper}<br/>

{"abcsadfsdf"|indent:100}
<br/>
{* using  php's str_repeat *}
{"="|str_repeat:80}<br/>

{* php's count *}
{$arr|count}<br/>


{"'Stiff Oppos &ition Expected to Casketless Funeral Plan'"|escape:'htmlall'} <br/>

{request_controller out='result' }

{foreach from=$result item=foo}
    <li>{$foo}</li>
{/foreach}
 
<!-- {$result|@var_dump} -->

{/block}